package com.jazz.filter;

import java.util.Random;

/**
 * @author jazz
 * 
 */
class Person implements Filterable {
	private String name;
	private int age;
	private boolean sex;

	public Person(String name, int age, boolean sex) {
		this.age = age;
		this.name = name;
		this.sex = sex;
	}

	public Person() {
	}

	@Override
	public String toString() {
		return name + ":" + age + ":" + sex;
	}

	@Override
	public int condition() {
//		 return age;
		// return name.hashCode();
		return sex ? 1231 : 11;
	}

	public int getValue() {
		return age;
	}

	public void setValue(int value) {
		this.age = value;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean isSex() {
		return sex;
	}

	public void setSex(boolean sex) {
		this.sex = sex;
	}
}